import request from '../utils/request';
/**
 *
 * @param url 地址
 * @param query 参数
 * @returns {AxiosPromise}
 */
export const userlogin = (url:any,query:any) => {
    return request({
        headers: {
            'Content-Type': 'application/json'
        },
        transformRequest: [function(data:any) {
            data = JSON.stringify(data)
            return data
        }],
        url: url,
        method: 'post',
        data:query
    });
};


/**
 *退出登录
 * @param url 地址
 *
 *
 */
export const logout = (url:any) => {
    return request({
        url: url,
        method: 'get',
    });
};
